import { createApp } from 'vue'
import App from './App.vue'
const app = createApp(App);
if (!global["vapp"]) { global["vapp"] = app }
import 'nprogress/nprogress.css';
import NProgress from 'nprogress';
NProgress.configure({
    showSpinner: false,
    parent: 'body',
    easing: "ease-in-out",
    speed: 300,
    trickleSpeed: 300,
});
app.config.globalProperties.$Loading = NProgress
import Antd from 'ant-design-vue'; 
app.use(Antd)
import mitt from 'mitt' //不同组件之间事件传递
app.config.globalProperties.$mitt = mitt()
import store from './js/common/store';
import { axios_set } from './js/common/utils/request.js'; axios_set()
import { apis_set } from './js/common/utils/apis.js'; apis_set()
import { utils_set } from './js/common/utils/utils.js'; utils_set()
import { turf_set } from './js/common/utils/turf.js'; turf_set()

import { TileHelper_set } from './js/common/utils/TileHelper.js'; TileHelper_set()

import * as Icons from '@ant-design/icons-vue'
for (const i in Icons) {
    app.component(i, Icons[i])
}

// import router from './js/common/router';
app.use(store)
.mount('#app');
// .use(createPinia())


window.onload = function () {
    console.log('window.onload');
    //VueApp.$Bus.$emit('active_menu', VueApp.$route.name);
};